This disclosure relates generally to database management systems, and more particularly to accelerated transactions with precommit-time early lock release of log files of a database.
To ensure isolation of transactions with a database, most traditional database management systems (DBMS) implement two-phase locking, in which the locks acquired via a transaction are held until the transaction commits or aborts. As shown in FIG. 1, convention early lock release proposals are based on a sequential logging architecture which has only a single log volume, and some techniques employ a precommit-time lock release scheme for parallel logging architecture. However, such schemes have to keep track of dependency among all the running update transactions and require a kind of two-phase commit (2PC) commit protocol, where a transaction end log record is written to the log disk after waiting until the transaction end log records of its dependent precommitted transactions are flushed. Some existing early lock release techniques typically employ a sequential logging architecture with a single volume. However, all of these techniques incur substantial overhead and require substantial inter-transaction dependency management.
A common logger can maintain a single log file for separate data processing engines, but in some cases, it may be desirable for a logger to maintain separate log volumes for each engine. For example, for two engines A and B, it may be desirable to maintain separate volumes of a log, such that when a transaction updates both table A and table B, of engine A and engine B respectively, one part of the log is assigned to an A log file and another part is assigned to a B log file.
However, in such a scenario, the transaction cannot commit until there is a synchronous log flush to both the A log file and B log file, which can be resource intensive, time-consuming, and prone to logging errors.